
var initUserFamilyInfoBean;
var getUserFamilyInfoBeanFromOpenPage = function(){
	var userfamilyinfoBean = {};
	userfamilyinfoBean.id = jQuery('#idEditor').val();
	
	
	userfamilyinfoBean.userId = jQuery('#userIdEditor').val();
	
	if(!userfamilyinfoBean.userId){
		$.ligerDialog.error("请输入成员!");
		return null;
	}	userfamilyinfoBean.fuserId = jQuery('#fuserIdEditor').val();
	
	if(!userfamilyinfoBean.fuserId){
		$.ligerDialog.error("请输入户主!");
		return null;
	}	
	return userfamilyinfoBean;
};

var initUserFamilyInfoPage = function(){
	
	
	
};

var bindUserFamilyInfoUpdateButtom = function(){
	jQuery('#updateEdit').unbind('click').click(function(){
		var userfamilyinfoBean = getUserFamilyInfoBeanFromOpenPage();
		if(null != userfamilyinfoBean){
			doSaveUserFamilyInfos([userfamilyinfoBean]);
		}
	});
};
var bindUserFamilyInfoResetButtom = function(){
	jQuery('#resetEdit').unbind('click').click(function(){
		if(!initUserFamilyInfoBean){
			jQuery("#userIdEditor").val('');
			jQuery("#fuserIdEditor").val('');
		}else{
			if(!initUserFamilyInfoBean.userId){
				jQuery("#userIdEditor").val('');
			}else{
				jQuery("#userIdEditor").val(initUserFamilyInfoBean.userId);
			}
			if(!initUserFamilyInfoBean.fuserId){
				jQuery("#fuserIdEditor").val('');
			}else{
				jQuery("#fuserIdEditor").val(initUserFamilyInfoBean.fuserId);
			}
		}
	});
};



jQuery(function(){
	initUserFamilyInfoPage();
	bindUserFamilyInfoUpdateButtom();
	bindUserFamilyInfoResetButtom();
});